import request from '@/config/axios'

// 门店商品 VO
export interface ShopPhotoVO {
  id: number // 编号
  storeId: string // 门店编号
  picUrl: string // 相册照片
  remark: string // 备注
  deptId: number // 部门编号
  ownerUserId: number // 负责人
}

// 门店商品 API
export const ShopPhotoApi = {
  // 查询门店商品分页
  getShopPhotoPage: async (params: any) => {
    return await request.get({ url: `/store/shop-photo/page`, params })
  },

  // 查询门店商品详情
  getShopPhoto: async (id: number) => {
    return await request.get({ url: `/store/shop-photo/get?id=` + id })
  },

  // 新增门店商品
  createShopPhoto: async (data: ShopPhotoVO) => {
    return await request.post({ url: `/store/shop-photo/create`, data })
  },

  // 修改门店商品
  updateShopPhoto: async (data: ShopPhotoVO) => {
    return await request.put({ url: `/store/shop-photo/update`, data })
  },

  // 删除门店商品
  deleteShopPhoto: async (id: number) => {
    return await request.delete({ url: `/store/shop-photo/delete?id=` + id })
  },

  // 导出门店商品 Excel
  exportShopPhoto: async (params) => {
    return await request.download({ url: `/store/shop-photo/export-excel`, params })
  },
}